PCRace Global values - mod races and stock ones, I call dibs on these numbers!
The Elder Scrolls Homepage | HelpSearchMembersCalendar |
Logged in as: OldeCow69 ( Log Out ) | My Controls · View New Posts · My Assistant · 0 New Messages |
Sabregirl |
Dec 22 2004, 01:43 AM
Post
#1
|
Curate Joined: 17-June 03 |
Anyway this is a silly little topic to inform/educate people about the PCRace global variable. In standard MW this is set via script when you start the game. However it can also be used for modded races as shown in the code below - you can set this as a startscript and stick a slightly modified version on an object near the census and excise office. If you leave it as a startscript only the player will be called a Dunmer until they save and re-load thier game once. In this case the new race is Tartarian. Note that you need to use the race's ID not the race name - they CAN be different.
I am also announcing/reserving a few of the PCRace global values so people will not conflict with my ridiculous number of races. Also other modders can use this information to write dialogue or use the PCRace value for my races in scripts if they choose. I do believe there are plenty of numbers to go around. Standard Races: Argonian = 1 Breton = 2 Dark Elf = 3 High Elf = 4 Imperial = 5 Khajiit = 6 Nord = 7 Orc = 8 Redguard = 9 Wood Elf = 10 My modded races: Jo'Rakht = 19 Pharlan = 21 Keynari = 22 Tartarian = 23 Ryukaissen = 24 (These have all been released) I am reserving Hrotha = 25 Chefik = 26 Of course I believe a lot of people naturally tend to want to use 11, but I'd advise staying away from that number just in case. Also I haven't given the Gryphon race a number so you're out of luck on that! CODE begin RaceCheck ;global script that gets run once to check the PC's race, so it can be used in dialogue if ( Player->GetRace "Argonian" == 1 ) set PCRace to 1 elseif ( Player->GetRace "Breton" == 1 ) set PCRace to 2 elseif ( Player->GetRace "Dark Elf" == 1 ) set PCRace to 3 elseif ( Player->GetRace "High Elf" == 1 ) set PCRace to 4 elseif ( Player->GetRace "Imperial" == 1 ) set PCRace to 5 elseif ( Player->GetRace "Khajiit" == 1 ) set PCRace to 6 elseif ( Player->GetRace "Nord" == 1 ) set PCRace to 7 elseif ( Player->GetRace "Orc" == 1 ) set PCRace to 8 elseif ( Player->GetRace "Redguard" == 1 ) set PCRace to 9 elseif ( Player->GetRace "Wood Elf" == 1 ) set PCRace to 10 elseif ( Player->GetRace "Tartarian" == 1 ) set PCRace to 23 endif stopscript RaceCheck end I do hope this has been informative. -S -------------------- My Mods page new beast races, werewolf mods, beast bodies.
The Ultimate Playable Race List Visit my Mod forums |
bodvar |
Yesterday, 08:19 PM
Post
#2
|
Initiate Joined: 31-May 04 From: Kent, WA |
Is this why when I make a new custom race and use it, all the npcs and stuff call me one of the base races?
-------------------- |
ReganInFrance |
Yesterday, 08:51 PM
Post
#3
|
Acolyte Joined: 15-November 04 |
QUOTE(Sabregirl @ Dec 21 2004, 05:43 PM) Anyway this is a silly little topic to inform/educate people about the PCRace global variable. I do hope this has been informative. Very I didn't know you could 'declare' other races like that, this opens new possibilities for dialogue. Now if only someone could organise all the new races available to use a different number. What happens if you don't have a particular race installed whan this script runs? Will it just ignore it and continue until it finds a race it recognises? -------------------- Do you NIF ?
If not, get Milkshape and the NIFLA plugins! http://www.milkshape3d.com http://groups.yahoo.com/group/NIFLA/ |
proweler |
Today, 01:14 AM
Post
#4
|
Diviner Joined: 27-November 02 |
To avoid mod conflict I suggest pepole start using HUGE numbers for there race. Like 199994556, 199994557, 199994558, ect.
Lowers the chance of pepole sitting on the same. The standard script that checks the race also shouldn't be changed. Make a new one and have it run as a global from the start on, then stop it when the choise is made. (Have it pick the race when the chargen for the origianl script triggers) This post has been edited by proweler: Today, 01:14 AM -------------------- Pray to whatever god you belief in that Justice may never be done to you.
|
Wrye |
Today, 04:08 AM
Post
#5
|
Adept Joined: 23-November 04 |
QUOTE To avoid mod conflict I suggest pepole start using HUGE numbers for there race. Like 199994556, 199994557, 199994558, etc. Conflict can be avoided altogether by using a custom race variable, e.g., wr_PCRace, and additional benefits can be gained by defining a PCHeight variable. This is discussed in Setting PCRace and PCSex The resulting code/dialog is flexible and easy to work with. (E.g., if you want to find all dialog affecting your race, just do a text search on your race variable (e.g., wr_PCRace for me.) However, if you're going to stick to PCRace, you'll probably want to limit yourself to a 5 digit number -- since 5 digits is the max that will show up in the dialog test box. (You can enter more, but you can't see them all at once.) QUOTE What happens if you don't have a particular race installed whan this script runs? Will it just ignore it and continue until it finds a race it recognises? SabreGirl's code post is a little misleading -- the name of the script is actually raceCheck_Tartarian (or something like that depending on which race mod she's using). So, she doesn't override the standard racecheck script. But to answer your question... since the script is in her race mod, it won't be present to run unless her race is available. -------------------- WRYE MORROWIND: Wrye Patches (Sorts Stuff); Wrye Modding Notes;
Wrye World (Mystica, Luggage, Portal Orbs, Homebound, etc.); Wyre Mash (Prevents/Fixes Doubling, Manages Mods and Saves, etc.) |
Lo-Fi Version |
0.1932sec
--
9 queries
GZIP Enabled
Time is now: 7th February 2005 - 10:31 PM |
|